listen_addresses = '{{ listen_address }}'
wal_level = 'replica'
ssl = off
max_connections = 3000
maintenance_work_mem = '2GB'
work_mem = '64MB'
max_wal_size = '100GB'
min_wal_size = '10GB'
checkpoint_timeout = '1h'
checkpoint_completion_target = '0.9'
bgwriter_lru_maxpages = 800
autovacuum_vacuum_cost_limit = 800
jit = off
random_page_cost = 1
max_wal_senders = 5
full_page_writes = ON
effective_cache_size = '{{ effective_cache_size }}'
shared_buffers = {{ shared_buffers }}
huge_pages = on
shared_preload_libraries = 'pg_stat_statements'
track_activity_query_size = 2048 # Increase tracked query string size
pg_stat_statements.track = all   # Track all statements including nested
track_io_timing = on             # Capture read/write stats
wal_compression = 'True'
data_directory = '{{ data_directory }}'
